﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BuscTerc.aspx.cs" Inherits="Consulta.Web.Pages.BuscTerc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Banacol-Buscar Terceros</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <a>Nombre :&nbsp;&nbsp;</a>
            <asp:TextBox ID="txtFiltro" runat="server"></asp:TextBox>
            &nbsp
            <asp:Button ID="btnBuscar" runat="server" Text="Buscar"/>
        </div>
        <p></p>
        <div>
            <asp:GridView ID="GridView1" runat="server" BackColor="White" 
                BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                DataSourceID="ObjectDataSourceTercero" GridLines="Horizontal"
                AutoGenerateColumns="False"
                AllowSorting="true"
                AllowPaging="true"
                PageSize = "20">
                
                <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Center" />
                <PagerSettings FirstPageText="Primero" LastPageText="Ultimo"/>
                
                <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                <AlternatingRowStyle BackColor="#F7F7F7" />
                <Columns>
                    <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" />
                    <asp:BoundField DataField="Nit" HeaderText="Nit" SortExpression="Nit" ItemStyle-HorizontalAlign="Right"/>
                    <asp:HyperLinkField DataTextField="NitCXP" HeaderText="NitCXP" SortExpression="NitCXP" 
                        DataNavigateUrlFormatString="~/Pages/Tesoreria.aspx?Nit={0}&Nombre={1}" 
                        DataNavigateUrlFields="NitCXP,Nombre" ItemStyle-HorizontalAlign="Right"/>
                    <asp:BoundField DataField="Direccion" HeaderText="Direccion" SortExpression="Direccion" />
                    <asp:BoundField DataField="Telefono" HeaderText="Telefono" SortExpression="Telefono" ItemStyle-HorizontalAlign="Right"/>
                    <asp:BoundField DataField="Estado" HeaderText="Estado" SortExpression="Estado" ItemStyle-HorizontalAlign="Center"/>
                </Columns>
            </asp:GridView>
        </div>
        <asp:ObjectDataSource ID="ObjectDataSourceTercero" 
                              runat="server" 
                              SelectMethod="ConsultarLista" 
                              TypeName="Consulta.Manager.MTercero" 
                              SortParameterName="pClausulaOrderBy">
            <SelectParameters>
                <asp:ControlParameter ControlID="txtFiltro" Name="pFiltro" PropertyName="Text" Type="String" DefaultValue="" />
                <asp:Parameter Name="pClausulaOrderBy" Type="String" DefaultValue="CuentaID" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </form>
</body>
</html>
